package com.example.as_sum.fragment;

import android.content.Intent;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.graphics.drawable.ShapeDrawable;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.example.as_sum.R;
import com.example.as_sum.activity.AnimActivity;
import com.example.as_sum.activity.AnimViewGroupActivity;
import com.example.as_sum.activity.DataBaseActivity;
import com.example.as_sum.activity.DropDownMenuActivity;
import com.example.as_sum.activity.NotificationCompatActivity;
import com.example.as_sum.activity.RecycleView2Activity;
import com.example.as_sum.expand.ExpandListViewActivirt;
import com.example.as_sum.imageutil.ImageActivity;
import com.example.as_sum.activity.RecyclerViewActivity;
import com.example.as_sum.car.ShopCarActivity;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainFirstFragment extends RootFragment {

    @Bind(R.id.fragment1_btn)
    Button fragment1Btn;
    @Bind(R.id.fragment1_btn2)
    Button fragment1Btn2;

    public static MainFirstFragment newInstance() {
        MainFirstFragment fragment = new MainFirstFragment();
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        BitmapDrawable drawable=new BitmapDrawable();
        ColorDrawable colorDrawable=new ColorDrawable(0xffff0000);
        ColorDrawable colorDrawable1=new ColorDrawable(getResources().getColor(R.color.colorPrimary));
        
    }

    @Override
    public void fetchData() {

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_first, container, false);
        ButterKnife.bind(this, view);
        return view;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.fragment1_btn, R.id.fragment1_btn2, R.id.fragment1_btn3,
            R.id.fragment1_btn31,R.id.fragment1_btn4, R.id.fragment1_btn5,
            R.id.fragment1_btn6, R.id.fragment1_btn7,R.id.fragment1_btn8,
            R.id.fragment1_btn9})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.fragment1_btn:
                Intent intent = new Intent(bContext, ShopCarActivity.class);
                startActivity(intent);
                break;
            case R.id.fragment1_btn2:
                Intent intent2 = new Intent(bContext, DropDownMenuActivity.class);
                startActivity(intent2);
                break;
            case R.id.fragment1_btn3:
                Intent intent3 = new Intent(bContext, RecyclerViewActivity.class);
                startActivity(intent3);
                break;
            case R.id.fragment1_btn31:
                Intent intent31 = new Intent(bContext, RecycleView2Activity.class);
                startActivity(intent31);
                break;
            case R.id.fragment1_btn4:
                Intent intent4 = new Intent(bContext, ImageActivity.class);
                startActivity(intent4);
                break;
            case R.id.fragment1_btn5:
                Intent intent5 = new Intent(bContext, ExpandListViewActivirt.class);
                startActivity(intent5);
                break;
            case R.id.fragment1_btn6:
                Intent intent6 = new Intent(bContext, AnimActivity.class);
                startActivity(intent6);
                break;
            case R.id.fragment1_btn7:
                Intent intent7 = new Intent(bContext, AnimViewGroupActivity.class);
                startActivity(intent7);
                break;
            case R.id.fragment1_btn8:
                Intent intent8 = new Intent(bContext, DataBaseActivity.class);
                startActivity(intent8);
                break;
            case R.id.fragment1_btn9:
                Intent intent9 = new Intent(bContext, NotificationCompatActivity.class);
                startActivity(intent9);
                break;
        }
    }
}
